
project(test)

set(TOP_DIR ./)

####
include_directories(${TOP_DIR}/func)
include_directories(${TOP_DIR}/nio)
include_directories(${TOP_DIR}/../third)

#####
aux_source_directory(${TOP_DIR} SRC_LIST)
aux_source_directory(${TOP_DIR}/func SRC_LIST)

aux_source_directory(${TOP_DIR}/nio/net SRC_LIST)
aux_source_directory(${TOP_DIR}/nio/thread SRC_LIST)

aux_source_directory(${TOP_DIR}/ut SRC_LIST)


add_compile_options(-std=c++11 -g)

# add_compile_options(-fsanitize=address)
# add_link_options(-fsanitize=address)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)

add_executable(test_bin ${SRC_LIST})

IF (CMAKE_SYSTEM_NAME MATCHES "WINDOWS")
	
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "LINUX")
    TARGET_LINK_LIBRARIES(test_bin pthread dl)
ENDIF ()
